

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>监视器与 OSD 交互的配置 &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/doctools.js"></script>
        <script src="../../../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../genindex/" />
    <link rel="search" title="Search" href="../../../search/" />
    <link rel="next" title="OSD 配置参考" href="../osd-config-ref/" />
    <link rel="prev" title="通过 DNS 查询监视器" href="../mon-lookup-dns/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../../" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../../">Ceph 存储集群</a></li>
          <li class="breadcrumb-item"><a href="../">配置</a></li>
      <li class="breadcrumb-item active">监视器与 OSD 交互的配置</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../../../_sources/rados/configuration/mon-osd-interaction.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../start/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephadm/">Cephadm</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../">Ceph 存储集群</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../">配置</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../storage-devices/">存储设备</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ceph-conf/">配置 Ceph</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/">通用选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#ceph-network-config">网络</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#id3">监视器</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#ceph-osd-config">认证</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#osds">OSDs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#id5">心跳</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#ceph-logging-and-debugging">日志记录、调试</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#ceph-conf">ceph.conf 实例</a></li>
<li class="toctree-l3"><a class="reference internal" href="../common/#ceph-runtime-config">跑多个集群（已废弃）</a></li>
<li class="toctree-l3"><a class="reference internal" href="../network-config-ref/">网络选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../msgr2/">信使协议 v2</a></li>
<li class="toctree-l3"><a class="reference internal" href="../auth-config-ref/">认证选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mon-config-ref/">监视器选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mon-lookup-dns/">通过 DNS 查询监视器</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">心跳选项（监视器与 OSD 的的交互）</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#index-1">OSD 验证心跳</a></li>
<li class="toctree-l4"><a class="reference internal" href="#osd-osd">OSD 报告死亡 OSD</a></li>
<li class="toctree-l4"><a class="reference internal" href="#index-3">OSD 报告互联失败</a></li>
<li class="toctree-l4"><a class="reference internal" href="#index-4">OSD 报告自己的状态</a></li>
<li class="toctree-l4"><a class="reference internal" href="#id4">配置选项</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../osd-config-ref/">OSD 选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mclock-config-ref/">DmClock 配置</a></li>
<li class="toctree-l3"><a class="reference internal" href="../bluestore-config-ref/">BlueStore 配置</a></li>
<li class="toctree-l3"><a class="reference internal" href="../filestore-config-ref/">FileStore 配置</a></li>
<li class="toctree-l3"><a class="reference internal" href="../journal-ref/">日志选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../pool-pg-config-ref/">存储池、归置组和 CRUSH 选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../general-config-ref/">常规选项</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../operations/">运维</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../man/">    手册页</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../troubleshooting/">故障排除</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../api/">APIs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="osd">
<h1>监视器与 OSD 交互的配置<a class="headerlink" href="#osd" title="Permalink to this heading"></a></h1>
<p id="index-0">完成基本配置后就可以部署、运行 Ceph 了。执行 <code class="docutils literal notranslate"><span class="pre">ceph</span> <span class="pre">health</span></code> 或 <code class="docutils literal notranslate"><span class="pre">ceph</span> <span class="pre">-s</span></code> 命令时，<a class="reference internal" href="../../../glossary/#term-43"><span class="xref std std-term">监视器</span></a>会报告 <a class="reference internal" href="../../../glossary/#term-28"><span class="xref std std-term">Ceph 存储集群</span></a>的当前状态。监视器通过让各 <a class="reference internal" href="../../../glossary/#term-48"><span class="xref std std-term">OSD</span></a> 自己报告、并接收 OSD 关于邻居状态的报告来掌握集群动态。如果监视器没收到报告，或者它只收到集群的变更报告，那它就要更新<a class="reference internal" href="../../../glossary/#term-32"><span class="xref std std-term">集群运行图</span></a>。</p>
<p>对于监视器与 OSD 的交互 Ceph 提供了合理的默认值，然而你可以覆盖默认值。下面几段从集群监控角度描述了 Ceph 监视器与 OSD 如何交互。</p>
<section id="index-1">
<span id="id1"></span><h2>OSD 验证心跳<a class="headerlink" href="#index-1" title="Permalink to this heading"></a></h2>
<p>各 OSD 每间隔 6 秒内的随机时间段会与其他 OSD 守护进程进行心跳检查，如果一个邻近的 OSD 在 20 秒的宽限期内都没有心跳，就把这个邻近 OSD 的状态标记为 <code class="docutils literal notranslate"><span class="pre">down</span></code> 、并上报给监视器，它会更新 Ceph 集群运行图。这个宽限期可以用 Ceph 配置文件的 <code class="docutils literal notranslate"><span class="pre">[mon]</span></code> 和 <code class="docutils literal notranslate"><span class="pre">[osd]</span></code> 段（同时配置）、或 <code class="docutils literal notranslate"><span class="pre">[global]</span></code> 段下的 <code class="docutils literal notranslate"><span class="pre">osd</span> <span class="pre">heartbeat</span> <span class="pre">grace</span></code> 选项更改、或者在运行时更改。</p>
<p class="ditaa">
<img src="../../../_images/ditaa-2682bbfd6dc26c875797468d1827fab099a22f67.png"/>
</p>
</section>
<section id="osd-osd">
<span id="index-2"></span><h2>OSD 报告死亡 OSD<a class="headerlink" href="#osd-osd" title="Permalink to this heading"></a></h2>
<p>在默认配置下，必须有两个来自不同主机的 Ceph OSD 守护进程向监视器报告了另一个 OSD 守护进程倒下（ <code class="docutils literal notranslate"><span class="pre">down</span></code> ）的消息，此时监视器才会确认那个报告所指的 OSD 倒下了。但是有可能报告这个错误的所有 OSD 都位于同一机架上、连着一个有问题的交换机，导致它们与另一个 OSD 的连接有问题；为避免此类误报，我们把报告这个错误的互联点们当作一个代理点，代理这部分滞后情况差不多的嫌疑“子集群”（相对于整个集群）。很明显，它不可能百发百中，但是遇到了就能帮我们把只需轻微修正的控制在遇挫系统的一个子集内。
<code class="docutils literal notranslate"><span class="pre">mon</span> <span class="pre">osd</span> <span class="pre">reporter</span> <span class="pre">subtree</span> <span class="pre">level</span></code> 选项可用于分组互联点，也就是按照它们在 CRUSH 图里的共同父级把这些节点分组为“子集群”；按默认配置，只需要有两个来自不同子树的报告就可以证明另一个 OSD 守护进程倒下了。你可以更改来自独立子树的报告者数量、以及要求的共同父级类型（向 Ceph 监视器报告某个 OSD 倒下时会被采纳），在 Ceph 配置文件的 <code class="docutils literal notranslate"><span class="pre">[mon]</span></code> 段下增加
<code class="docutils literal notranslate"><span class="pre">mon</span> <span class="pre">osd</span> <span class="pre">min</span> <span class="pre">down</span> <span class="pre">reporters</span></code> 和
<code class="docutils literal notranslate"><span class="pre">mon</span> <span class="pre">osd</span> <span class="pre">reporter</span> <span class="pre">subtree</span> <span class="pre">level</span></code> 即可，或者更改运行时配置。</p>
<p class="ditaa">
<img src="../../../_images/ditaa-19a146bb1b834092f43a5cbacad879be638bb5b0.png"/>
</p>
</section>
<section id="index-3">
<span id="id2"></span><h2>OSD 报告互联失败<a class="headerlink" href="#index-3" title="Permalink to this heading"></a></h2>
<p>如果一 OSD 守护进程不能和配置文件中定义的任何 OSD 建立连接，它会每 30 秒向监视器索要一次最新集群运行图，你可以在 <code class="docutils literal notranslate"><span class="pre">[osd]</span></code>
下设置 <code class="docutils literal notranslate"><span class="pre">osd</span> <span class="pre">mon</span> <span class="pre">heartbeat</span> <span class="pre">interval</span></code> 来更改这个心跳间隔，或者运行时更改。</p>
<p class="ditaa">
<img src="../../../_images/ditaa-3be8063f2107d6bed20af635ba9f0b349ab103d2.png"/>
</p>
</section>
<section id="index-4">
<span id="id3"></span><h2>OSD 报告自己的状态<a class="headerlink" href="#index-4" title="Permalink to this heading"></a></h2>
<p>如果一 OSD 在 <code class="docutils literal notranslate"><span class="pre">mon</span> <span class="pre">osd</span> <span class="pre">report</span> <span class="pre">timeout</span></code> 时间内没向监视器报告过，监视器就认为它 <code class="docutils literal notranslate"><span class="pre">down</span></code> 了。在 OSD 守护进程会向监视器报告某些事件，如某次操作失败、归置组状态变更、 <code class="docutils literal notranslate"><span class="pre">up_thru</span></code> 变更、或它将在 5 秒内启动。你可以设置 <code class="docutils literal notranslate"><span class="pre">[osd]</span></code> 下的 <code class="docutils literal notranslate"><span class="pre">osd</span> <span class="pre">mon</span> <span class="pre">report</span> <span class="pre">interval</span></code> 来更改最小报告间隔，或在运行时更改。 OSD 守护进程每 120 秒会向监视器报告其状态，不论是否有值得报告的事件。在 <code class="docutils literal notranslate"><span class="pre">[osd]</span></code> 段下设置 <code class="docutils literal notranslate"><span class="pre">osd</span> <span class="pre">mon</span> <span class="pre">report</span> <span class="pre">interval</span> <span class="pre">max</span></code>
可更改 OSD 报告间隔，或运行时更改。</p>
<p class="ditaa">
<img src="../../../_images/ditaa-baed01044edee3c7d086441dc9b246682de1e91c.png"/>
</p>
</section>
<section id="id4">
<h2>配置选项<a class="headerlink" href="#id4" title="Permalink to this heading"></a></h2>
<p>心跳选项应该置于配置文件的 <code class="docutils literal notranslate"><span class="pre">[global]</span></code> 段下。</p>
<section id="index-5">
<span id="id5"></span><h3>监视器选项<a class="headerlink" href="#index-5" title="Permalink to this heading"></a></h3>
<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_min_up_ratio">
<span class="sig-name descname"><span class="pre">mon_osd_min_up_ratio</span></span><a class="headerlink" href="#confval-mon_osd_min_up_ratio" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>要把 OSD 守护进程标记为 <code class="docutils literal notranslate"><span class="pre">down</span></code> 前，维持处于 <code class="docutils literal notranslate"><span class="pre">up</span></code> 状态的 OSD 最小比例。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">float</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">0.3</span></code></p>
</dd>
<dt class="field-odd">see also<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="#confval-mon_osd_down_out_interval"><code class="xref std std-confval docutils literal notranslate"><span class="pre">mon_osd_down_out_interval</span></code></a></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_min_in_ratio">
<span class="sig-name descname"><span class="pre">mon_osd_min_in_ratio</span></span><a class="headerlink" href="#confval-mon_osd_min_in_ratio" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>要把 OSD 标记为 <code class="docutils literal notranslate"><span class="pre">out</span></code> 前，维持处于 <code class="docutils literal notranslate"><span class="pre">in</span></code> 状态的 OSD 最小比例。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">float</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">0.75</span></code></p>
</dd>
<dt class="field-odd">see also<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="#confval-mon_osd_down_out_interval"><code class="xref std std-confval docutils literal notranslate"><span class="pre">mon_osd_down_out_interval</span></code></a></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_laggy_halflife">
<span class="sig-name descname"><span class="pre">mon_osd_laggy_halflife</span></span><a class="headerlink" href="#confval-mon_osd_laggy_halflife" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>滞后量消退时间，秒。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">1</span> <span class="pre">hour</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_laggy_weight">
<span class="sig-name descname"><span class="pre">mon_osd_laggy_weight</span></span><a class="headerlink" href="#confval-mon_osd_laggy_weight" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>滞后量消退时新样本的权重。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">float</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">0.3</span></code></p>
</dd>
<dt class="field-odd">allowed range<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">[0,</span> <span class="pre">1]</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_laggy_max_interval">
<span class="sig-name descname"><span class="pre">mon_osd_laggy_max_interval</span></span><a class="headerlink" href="#confval-mon_osd_laggy_max_interval" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>滞后量中 <code class="docutils literal notranslate"><span class="pre">laggy_interval</span></code> 的最大值，单位为秒。监视器用一种自适应方法来评估某个 OSD 的
<code class="docutils literal notranslate"><span class="pre">laggy_interval</span></code> ，计算这个 OSD 的宽限时间要用到这个值。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">5</span> <span class="pre">minutes</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_adjust_heartbeat_grace">
<span class="sig-name descname"><span class="pre">mon_osd_adjust_heartbeat_grace</span></span><a class="headerlink" href="#confval-mon_osd_adjust_heartbeat_grace" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置为 <code class="docutils literal notranslate"><span class="pre">true</span></code> 时， Ceph 将根据滞后量伸缩（宽限期）。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p>
</dd>
<dt class="field-odd">see also<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="#confval-mon_osd_laggy_halflife"><code class="xref std std-confval docutils literal notranslate"><span class="pre">mon_osd_laggy_halflife</span></code></a>, <a class="reference internal" href="#confval-mon_osd_laggy_weight"><code class="xref std std-confval docutils literal notranslate"><span class="pre">mon_osd_laggy_weight</span></code></a>, <a class="reference internal" href="#confval-mon_osd_laggy_max_interval"><code class="xref std std-confval docutils literal notranslate"><span class="pre">mon_osd_laggy_max_interval</span></code></a></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_adjust_down_out_interval">
<span class="sig-name descname"><span class="pre">mon_osd_adjust_down_out_interval</span></span><a class="headerlink" href="#confval-mon_osd_adjust_down_out_interval" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>设置为 <code class="docutils literal notranslate"><span class="pre">true</span></code> 时， Ceph 将根据滞后量伸缩（宽限期）。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p>
</dd>
<dt class="field-odd">see also<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="#confval-mon_osd_adjust_heartbeat_grace"><code class="xref std std-confval docutils literal notranslate"><span class="pre">mon_osd_adjust_heartbeat_grace</span></code></a></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_auto_mark_in">
<span class="sig-name descname"><span class="pre">mon_osd_auto_mark_in</span></span><a class="headerlink" href="#confval-mon_osd_auto_mark_in" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>Ceph 将把所有启动中的 OSD 守护进程标记为在 Ceph 存储集群中（ <code class="docutils literal notranslate"><span class="pre">in</span></code> ）。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_auto_mark_auto_out_in">
<span class="sig-name descname"><span class="pre">mon_osd_auto_mark_auto_out_in</span></span><a class="headerlink" href="#confval-mon_osd_auto_mark_auto_out_in" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>把正在启动、且被自动标记为 <code class="docutils literal notranslate"><span class="pre">out</span></code> 状态的 OSD 标记为 <code class="docutils literal notranslate"><span class="pre">in</span></code> （在集群内）。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p>
</dd>
<dt class="field-odd">see also<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="#confval-mon_osd_down_out_interval"><code class="xref std std-confval docutils literal notranslate"><span class="pre">mon_osd_down_out_interval</span></code></a></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_auto_mark_new_in">
<span class="sig-name descname"><span class="pre">mon_osd_auto_mark_new_in</span></span><a class="headerlink" href="#confval-mon_osd_auto_mark_new_in" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>把正在启动的新 OSD 守护进程标记为 <code class="docutils literal notranslate"><span class="pre">in</span></code> ，即在 Ceph 存储集群内。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_down_out_interval">
<span class="sig-name descname"><span class="pre">mon_osd_down_out_interval</span></span><a class="headerlink" href="#confval-mon_osd_down_out_interval" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>一个 OSD 守护进程多少秒没响应就把它标记为 <code class="docutils literal notranslate"><span class="pre">down</span></code> 且 <code class="docutils literal notranslate"><span class="pre">out</span></code> 。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">10</span> <span class="pre">minutes</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_down_out_subtree_limit">
<span class="sig-name descname"><span class="pre">mon_osd_down_out_subtree_limit</span></span><a class="headerlink" href="#confval-mon_osd_down_out_subtree_limit" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>Ceph <strong>不会</strong>自动标记为 out 的最小 <a class="reference internal" href="../../../glossary/#term-CRUSH"><span class="xref std std-term">CRUSH</span></a> 单元类型。例如，如果设置为 <code class="docutils literal notranslate"><span class="pre">host</span></code>
，然后，假设某一主机上的所有 OSD 都离线了，Ceph 也不会自动把这些 OSD 标记为 out 。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">rack</span></code></p>
</dd>
<dt class="field-odd">see also<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="#confval-mon_osd_down_out_interval"><code class="xref std std-confval docutils literal notranslate"><span class="pre">mon_osd_down_out_interval</span></code></a></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_report_timeout">
<span class="sig-name descname"><span class="pre">mon_osd_report_timeout</span></span><a class="headerlink" href="#confval-mon_osd_report_timeout" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>宣布无响应 OSD 守护进程为 <code class="docutils literal notranslate"><span class="pre">down</span></code> 前的宽限秒数。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">15</span> <span class="pre">minutes</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_min_down_reporters">
<span class="sig-name descname"><span class="pre">mon_osd_min_down_reporters</span></span><a class="headerlink" href="#confval-mon_osd_min_down_reporters" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>确定一个 OSD 守护进程状态为 <code class="docutils literal notranslate"><span class="pre">down</span></code> 最少需要几个 OSD 的报告。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">uint</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">2</span></code></p>
</dd>
<dt class="field-odd">see also<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="#confval-mon_osd_reporter_subtree_level"><code class="xref std std-confval docutils literal notranslate"><span class="pre">mon_osd_reporter_subtree_level</span></code></a></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-mon_osd_reporter_subtree_level">
<span class="sig-name descname"><span class="pre">mon_osd_reporter_subtree_level</span></span><a class="headerlink" href="#confval-mon_osd_reporter_subtree_level" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>哪一级父级桶内的报告者可以计算在内。OSD 们如果发现与它互联的 OSD 没响应了，会向监视器报告；监视器会把报告所指的
<code class="docutils literal notranslate"><span class="pre">OSD</span></code> 标记为 out 、过了宽限期再标记为 down 。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">host</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

</section>
<section id="index-6">
<span id="id6"></span><h3>OSD 选项<a class="headerlink" href="#index-6" title="Permalink to this heading"></a></h3>
<dl class="std confval">
<dt class="sig sig-object std" id="confval-osd_heartbeat_interval">
<span class="sig-name descname"><span class="pre">osd_heartbeat_interval</span></span><a class="headerlink" href="#confval-osd_heartbeat_interval" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>一个 OSD 探测互联着的邻居们的频率，单位为秒。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">6</span></code></p>
</dd>
<dt class="field-odd">allowed range<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">[1,</span> <span class="pre">1_min]</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-osd_heartbeat_grace">
<span class="sig-name descname"><span class="pre">osd_heartbeat_grace</span></span><a class="headerlink" href="#confval-osd_heartbeat_grace" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>OSD 多久没心跳就会被集群认为它挂（ <code class="docutils literal notranslate"><span class="pre">down</span></code> ）了。此选项必须在 [mon] 和 [osd] 段下同时设置、或者在
[global] 段下设置，因为 MON 和 OSD 都得配置才能生效。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">20</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-osd_mon_heartbeat_interval">
<span class="sig-name descname"><span class="pre">osd_mon_heartbeat_interval</span></span><a class="headerlink" href="#confval-osd_mon_heartbeat_interval" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>一个 OSD 没有互联的 OSD 守护进程时多久探测一次监视器。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">30</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-osd_mon_heartbeat_stat_stale">
<span class="sig-name descname"><span class="pre">osd_mon_heartbeat_stat_stale</span></span><a class="headerlink" href="#confval-osd_mon_heartbeat_stat_stale" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>这么长的秒数内都没更新状态时，就停止报告心跳探测次数。设置为 0 可以禁用此行为。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">1</span> <span class="pre">hour</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="std confval">
<dt class="sig sig-object std" id="confval-osd_mon_report_interval">
<span class="sig-name descname"><span class="pre">osd_mon_report_interval</span></span><a class="headerlink" href="#confval-osd_mon_report_interval" title="Permalink to this definition"></a></dt>
<dd><blockquote>
<div><p>从一个 Ceph OSD 守护进程启动或其它可报告的事件发生以来，多长时间内必须向监视器报告一次。单位为秒。</p>
<dl class="field-list simple">
<dt class="field-odd">type<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
<dt class="field-even">default<span class="colon">:</span></dt>
<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">5</span></code></p>
</dd>
</dl>
</div></blockquote>
</dd></dl>

</section>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../mon-lookup-dns/" class="btn btn-neutral float-left" title="通过 DNS 查询监视器" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="../osd-config-ref/" class="btn btn-neutral float-right" title="OSD 配置参考" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>